import java.util.Random;
import java.util.Scanner;
/*
编写一个猜拳游戏
有个人Tom，设计它的成员方法，可以和电脑猜拳，电脑每次随机生成0，1,2,
分别表示为石头 剪刀 步
*/
public class Homework9{
	public static void main(String args[]){
		Tom t = new Tom();
		int count = 0;
		int [][] arr1 = new int [3][3];
		String [] arr2 = new String [3];
		Scanner scanner = new Scanner(System.in);
		System.out.println("输入你要猜的拳：0,1,2");
		int num = scanner.nextInt();
		t.setTomGuessNum(num);
		int tomGuess = t.getTomGuessNum;
		arr[i][j + 1] = tomGuess;
		int computerGuess = t.computerGuessNum;
		arr1[i][j+2] = computerGuess;
		String isWin = t.vsComputer();
		arr2[i] = isWin;
		arr1[i][j] = t.count;
			System.out.println("=================");
				System.out.println("");
				System.out.println();
				System.out.println();
				System.out.println("");
				isWinCount = t.winCount(isWin);

		}
		System.out.println()









}

class Tom {
	int tomGuessNum;
	int computerGuessNum;
	int winCountNum;
	int count = 1;
	public void show(){

	}
	public int computerGuessNum(){
		Random r = new Random();
		computerGuessNum = r.nexInt(3);
		return computerGuessNum;
	}
	public void setTomGuessNum(int tomGuessNum){
		if(tomGuessNum > 2 || tomGuessNum < 0){
			throw new IllegalAccessException("NumError!");
		}
		this.tomGuessNum = tomGuessNum;
	}
	public int getTomGuessNum(){
		return tomGuessNum;
	}
	public String vsComputer(){
		if(tomGuessNum == 0 && computerGuessNum == 1){
			return win;
		}else if(tomGuessNum == 1 && computerGuessNum == 2){
			return win;
		}else if (tomGuessNum == 2 && computerGuessNum == 1) {
			return defeat;
		}else if (tomGuessNum == computerGuessNum ) {
			return draw;	
		}else{
			return defeat;
		}
	}
}